package com.bugtracker.modeling.entities;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;


@Entity
@Table(name = "User", uniqueConstraints =  {
    @UniqueConstraint(columnNames =  {
        "id", "userid"}
    )
}
)
public class User extends BaseEntityObject implements Comparable, Serializable {
    private int id;
    private String username;
    private String password;
    private String emailid;
    private String profilename;
    private String timezone;
    private int version;
    private String locale;

    public User() {
    }

    public int compareTo(Object o) {
        // TODO Auto-generated method stub
        return 0;
    }

    @Override
    public boolean equals(Object obj) {
        return (this == obj);
    }

    public String getEmailid() {
        return emailid;
    }

    public int getId() {
        return id;
    }

    public String getLocale() {
        return locale;
    }

    public String getPassword() {
        return password;
    }

    public String getProfilename() {
        return profilename;
    }

    public String getTimezone() {
        return timezone;
    }

    public String getUsername() {
        return username;
    }

    @Version
    @Column(name = "version")
    public int getVersion() {
        return version;
    }

    @Override
    public int hashCode() {
        return 0;
    }

    public void setEmailid(String emailid) {
        this.emailid = emailid;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setLocale(String locale) {
        this.locale = locale;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setProfilename(String profilename) {
        this.profilename = profilename;
    }

    public void setTimezone(String timezone) {
        this.timezone = timezone;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    @Override
    public String toString() {
        return null;
    }
}
